package com.ding.dailyup.model;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

import static javax.persistence.GenerationType.IDENTITY;

import org.hibernate.annotations.DynamicInsert;

@Entity
@DynamicInsert
@Table(name = "stock_strategy")
public class StockStrategy implements Serializable {
    public static final long serialVersionUID = 5221284854798601668L;
    private Long id;
    private String strategyName;
    private String strategyDescription;
    private String strategyUrl;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private Integer status;


    public StockStrategy() {
    }

    public StockStrategy(
            String strategyName, String strategyDescription, String strategyUrl, LocalDateTime createTime, LocalDateTime updateTime, Integer status) {
        this.strategyName = strategyName;
        this.strategyDescription = strategyDescription;
        this.strategyUrl = strategyUrl;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.status = status;
    }


    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id")
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    /**
     * @return 策略名称
     */
    @Column(name = "strategyName")
    public String getStrategyName() {
        return strategyName;
    }

    public void setStrategyName(String strategyName) {
        this.strategyName = strategyName;
    }


    /**
     * @return 策略描述 default : ''
     */
    @Column(name = "strategyDescription")
    public String getStrategyDescription() {
        return strategyDescription;
    }

    public void setStrategyDescription(String strategyDescription) {
        this.strategyDescription = strategyDescription;
    }


    /**
     * @return 策略链接备用 default : ''
     */
    @Column(name = "strategyUrl")
    public String getStrategyUrl() {
        return strategyUrl;
    }

    public void setStrategyUrl(String strategyUrl) {
        this.strategyUrl = strategyUrl;
    }


    @Column(name = "createTime")
    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }


    @Column(name = "updateTime")
    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }


    /**
     * @return 状态 0 不可用 1可用 default : 1
     */
    @Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

}